package com.boomsecret.io;

import org.apache.commons.io.IOUtils;

import java.io.InputStream;
import java.net.URL;

/**
 * Created by wangjinliang on 2018/4/11.
 */
public class IODemo {
    public static void main(String[] args) throws Exception {
        InputStream in = new URL("http://commons.apache.org").openStream();
        try {
            System.out.println(IOUtils.toString(in));
        } finally {
            IOUtils.closeQuietly(in);
        }
    }
}
